package ua.od.edu.labWork1.variant1;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: Oxana
 * Date: 9/16/13
 * Time: 7:19 PM
 * To change this template use File | Settings | File Templates.
 */
public class LabWork1 {
    private String name="";
    public LabWork1() {
    }
    public void dialog(){
        System.out.println("What is your name?");
        Scanner scan=new Scanner(System.in);
        if (scan.hasNext()){
            name+=scan.nextLine();
        }
        System.out.println("Hello, "+name+"!");
    }
}
